<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>盒子的叠放顺序</title>
		<style>
			div {
				position: absolute;
				width: 300px;
				height: 300px;
			}
			.one {
				top: 0;
				left: 0;
				background-color: yellow;
				z-index: 2;
			}
			.two {
				left: 100px;
				background-color: blue;
				z-index: 1;
			}
			.three {
				top: 100px;
				background-color: red;
			}
		</style>
	</head>
	<body>
		<div class="one"></div>
		<div class="two"></div>
		<div class="three"></div>
	</body>
</html>